const shapefile = require('shapefile');

// 读取 Shapefile 文件
shapefile.read('./src/utils/shp/分省.shp').then(geojson => {
    // 处理 GeoJSON 数据
    console.log(geojson);
    console.log("-------------------------")
    // 遍历每个特征
    geojson.features.forEach(feature => {
        console.log('Feature geometry.type:', feature.geometry);
        console.log('Feature geometry.type:', feature.geometry.type);
        console.log('Feature geometry.coordinates:', feature.geometry.coordinates);
        console.log('Feature properties:', feature.properties);
    });
})
    .catch(error => {
        console.error('Error reading shapefile:', error);
    });
